Cooking: WIP Cauliflower Wings Recipe
[clinton/website/site/unknownlamer.org.git] / Metaobject Protocols.html
index 24ca916..a3c6f96 100644 (file)
@@ -7,7 +7,9 @@
     <meta name="generator" content="muse.el" />
     <meta http-equiv="Content-Type"
           content="text/html; charset=utf-8" />
-    <link href="http://feeds.unknownlamer.org/rss/site-updates" 
+    <meta name="viewport"
+         content="width=device-width, initial-scale=1.0" />
+    <link href="https://feeds.unknownlamer.org/rss/site-updates" 
           rel="alternate" type="application/rss+xml" title="Updates Feed" />
 
 <link rel="stylesheet" href="default.css" />
 </dl>
 </dd>
 <dt>
-<a href="#sec25">Procedural Only Where Neccesary</a>
+<a href="#sec25">Procedural Only Where Necessary</a>
 </dt>
 <dt>
 <a href="#sec26">Real World</a>
 </dl>
 </dd>
 <dt>
-<a href="#sec30">Sources &amp;amp; Further Reading</a>
+<a href="#sec30">Sources and Further Reading</a>
 </dt>
 <dd>
 <dl>
 </dt>
 </dl>
 </dd>
+<dt>
+<a href="#sec39">Software</a>
+</dt>
+<dd>
+<dl>
+<dt>
+<a href="#sec40">Closer to MOP</a>
+</dt>
+</dl>
+</dd>
 </dl>
 </dd>
 </dl>
 </div>
 
 
-<!-- Page published by Emacs Muse begins here --><p>In Fall of 2006 I did a small project on Metaobject Protocols for my
+<!-- Page published by Emacs Muse begins here -->
+<p>In Fall of 2006 I did a small project on Metaobject Protocols for my
 CS 331 class. Here lie my notes which may perhaps be useful to
 others. I hope to expand them into something more useful over time.</p>
 
@@ -240,7 +253,7 @@ are meant only to be used by the protocol defined around the class.</p>
   ((bar <span class="emacs-face-builtin">:accessor</span> bar-of <span class="emacs-face-builtin">:initform</span> (list 1 2 3))))
 </pre>
 
-<p>Slot defintions have several options; the above example shows only the
+<p>Slot definitions have several options; the above example shows only the
 <code>:accessor</code> and <code>:initform</code> options which are the most commonly
 used. <code>:accessor</code> generates an accessor for the slot (e.g. if you have
 an instance of <code>example</code> you can <code>(setf (foo-of some-example-instance)
@@ -264,11 +277,11 @@ enable selective modification of individual facets with minimal code.</p>
   (options) ...)
 
 (<span class="emacs-face-keyword">defmethod</span> <span class="emacs-face-function-name">generic-name</span> ((parameter type) parameter ...)
-  <span class="emacs-face-string">"documentation string"</span>
+  <span class="emacs-face-doc">"documentation string"</span>
   body)
 
 (<span class="emacs-face-keyword">defgeneric</span> <span class="emacs-face-function-name">foo</span> (bar baz quux)
-  (<span class="emacs-face-builtin">:documentation</span> <span class="emacs-face-string">"Process the baz with the quux capacitor to make the
+  (<span class="emacs-face-builtin">:documentation</span> <span class="emacs-face-doc">"Process the baz with the quux capacitor to make the
 foo widget fly into the sky at warp speed"</span>))
 
 (<span class="emacs-face-keyword">defmethod</span> <span class="emacs-face-function-name">foo</span> ((bar example) baz (quux capacitor))
@@ -325,7 +338,7 @@ Design Patterns</h3>
 programs. Many of them are merely methods to get around deficiencies
 in the language, and can be quite messy to implement in some
 languages. Ideally a pattern would be subsumed by the language, but
-real world contraints require language standards to remain fairly
+real world constraints require language standards to remain fairly
 static.</p>
 
 
@@ -400,7 +413,7 @@ languages to expose a reflective MOP.</p>
 
 <pre class="src">
 (<span class="emacs-face-keyword">defgeneric</span> <span class="emacs-face-function-name">example-inspect</span> (instance)
-  (<span class="emacs-face-builtin">:documentation</span> <span class="emacs-face-string">"Simple object inspector using CLOS MOP"</span>))
+  (<span class="emacs-face-builtin">:documentation</span> <span class="emacs-face-doc">"Simple object inspector using CLOS MOP"</span>))
 
 (<span class="emacs-face-keyword">defmethod</span> <span class="emacs-face-function-name">example-inspect</span> ((instance t))
   (format t <span class="emacs-face-string">"Simple Object~% Value: ~S~%"</span> instance))
@@ -444,7 +457,7 @@ Intercessory</h4>
 implementing methods which override certain aspects of the language
 behavior. This class of MOPs are what make MOPs especially
 powerful. No longer must a problem be restructured to fit the
-implementation language; the underyling language can be reshaped to
+implementation language; the underlying language can be reshaped to
 fit the task at hand, and obfuscation of the intended structure of the
 application can be avoided.</p>
 
@@ -459,17 +472,17 @@ any existing class observable.</p>
 
 <p>In a language lacking a MOP, implementing the observer pattern
 requires modifying every accessor of a class to explicitly invoke any
-observers, and neccesitates the addition of a mixin class to the class
-heirarchy. The fact that an object can be observed is a meta property
+observers, and necessitates the addition of a mixin class to the class
+hierarchy. The fact that an object can be observed is a meta property
 of the class, and forcing it to be implemented at the application
-level dirties the inheritance heirarchy and adds uneccesary meta
+level dirties the inheritance hierarchy and adds unnecessary meta
 details to the program.</p>
 
 <pre class="src">
 <span class="emacs-face-comment-delimiter">;;; </span><span class="emacs-face-comment">This metaclass adds a slot to instances which use it, and so the
 </span><span class="emacs-face-comment-delimiter">;;; </span><span class="emacs-face-comment">system is defined in its own package to avoid name conflicts
 </span>(<span class="emacs-face-keyword">defpackage</span> <span class="emacs-face-type">:observer</span>
-  (<span class="emacs-face-builtin">:use</span> <span class="emacs-face-builtin">:cl</span> #+sbcl <span class="emacs-face-builtin">:sb-mop</span>)
+  (<span class="emacs-face-builtin">:use</span> <span class="emacs-face-builtin">:cl</span> <span class="emacs-face-builtin">:c2mop</span>)
   (<span class="emacs-face-builtin">:export</span> observable register-observer unregister-observer))
 
 (<span class="emacs-face-keyword">in-package</span> <span class="emacs-face-builtin">:observer</span>)
@@ -477,10 +490,10 @@ details to the program.</p>
 <span class="emacs-face-comment-delimiter">;;; </span><span class="emacs-face-comment">Metaclass
 </span>(<span class="emacs-face-keyword">defclass</span> <span class="emacs-face-type">observable</span> (standard-class)
   ()
-  (<span class="emacs-face-builtin">:documentation</span> <span class="emacs-face-string">"Metaclass for observable objects"</span>))
+  (<span class="emacs-face-builtin">:documentation</span> <span class="emacs-face-doc">"Metaclass for observable objects"</span>))
 
 (<span class="emacs-face-keyword">defmethod</span> <span class="emacs-face-function-name">compute-slots</span> ((class observable))
-  <span class="emacs-face-string">"Add a slot for storing observers to observable instances"</span>
+  <span class="emacs-face-doc">"Add a slot for storing observers to observable instances"</span>
   (cons (make-instance 'standard-effective-slot-definition
                        <span class="emacs-face-builtin">:name</span> 'observers
                        <span class="emacs-face-builtin">:initform</span> '(make-hash-table)
@@ -544,7 +557,7 @@ details to the program.</p>
                                      slot-name)
   (gethash slot-name (slot-value instance 'observers)))
 
-(<span class="emacs-face-keyword">defmethod</span> (<span class="emacs-face-function-name">setf slot-value-using-class)</span> <span class="emacs-face-builtin">:before</span> (new-value
+(<span class="emacs-face-keyword">defmethod</span> (<span class="emacs-face-function-name">setf slot-value-using-class</span>) <span class="emacs-face-builtin">:before</span> (new-value
                                                   (class observable)
                                                   instance
                                                   slot)
@@ -650,12 +663,12 @@ checks or copying.</p>
 
 
 <h3><a name="sec25" id="sec25"></a>
-Procedural Only Where Neccesary</h3>
+Procedural Only Where Necessary</h3>
 
-<p class="first">Some operations like method invocation are inheretly stateful and so
+<p class="first">Some operations like method invocation are inherently stateful and so
 must use a procedural protocol. There is no benefit to be gained from
 using a functional protocol, and indeed an attempt would result in
-obtuse code that severely restricted the implementian. Do note that
+obtuse code that severely restricted the implementation. Do note that
 only a very small part of method invocation is stateful (the actual
 call), and most of it can be implemented functionally (e.g. computing
 the discriminating function).</p>
@@ -667,7 +680,7 @@ Real World</h3>
 <h4><a name="sec27" id="sec27"></a>
 <a href="http://common-lisp.net/project/ucw/">UCW</a> and <a href="http://common-lisp.net/project/bese/arnesi.html">Arnesi</a></h4>
 
-<p class="first">Arnesi uses the CLOS MOP to implement methods which are transparantly
+<p class="first">Arnesi uses the CLOS MOP to implement methods which are transparently
 rewritten into continuation passing style. This allows their execution
 to be suspended at certain points and resumed later. UCW builds on top
 of this to support a web framework where the statelessness of http is
@@ -688,7 +701,7 @@ implementing relational slots).</p>
 <h4><a name="sec29" id="sec29"></a>
 <a href="http://common-lisp.net/project/elephant/">Elephant</a></h4>
 
-<p class="first">Elephant uses the CLOS MOP to transparantly store any class to disk
+<p class="first">Elephant uses the CLOS MOP to transparently store any class to disk
 and handle paging between the disk store and memory efficiently
 without user intervention.</p>
 
@@ -696,7 +709,7 @@ without user intervention.</p>
 
 
 <h2><a name="sec30" id="sec30"></a>
-Sources &amp;amp; Further Reading</h2>
+Sources and Further Reading</h2>
 
 <h3><a name="sec31" id="sec31"></a>
 Sources</h3>
@@ -755,37 +768,52 @@ notes, and so the 331 pages might not actually take that long to read.</p>
 
 
 
+<h3><a name="sec39" id="sec39"></a>
+Software</h3>
+
+<h4><a name="sec40" id="sec40"></a>
+<a href="http://common-lisp.net/project/closer/closer-mop.html">Closer to MOP</a></h4>
+
+<p class="first">Compatibility layer that attempts to present the <em>Art of the Metaobject
+Protocol</em> MOP specification properly in as many Common Lisp
+implementation as possible.</p>
+
+
+
 
   <!-- Page published by Emacs Muse ends here -->
 
   <p class="cke-buttons">
     <!-- validating badges, any browser, etc -->
-    <a href="http://validator.w3.org/check/referer"><img
-       src="http://www.w3.org/Icons/valid-xhtml10"
+    <a href="https://validator.w3.org/check/referer"><img
+       src="https://www.w3.org/Icons/valid-xhtml10"
        alt="Valid XHTML 1.0!" /></a>
     
-    <a href="http://www.anybrowser.org/campaign/"><img
+    <a href="https://www.anybrowser.org/campaign/"><img
        src="img/buttons/w3c_ab.png" alt="[ Viewable With Any Browser
        ]" /></a>
 
-    <a href="http://www.debian.org/"><img
+    <a href="https://www.debian.org/"><img
        src="img/buttons/debian.png" alt="[ Powered by Debian ]" /></a>
     
-    <a href="http://hcoop.net/">
+    <a href="https://hcoop.net/">
       <img src="img/buttons/hcoop.png" 
        alt="[ Hosted by HCoop]" />
     </a>
 
-    <a href="http://www.fsf.org/register_form?referrer=114">
+    <a href="https://www.fsf.org/register_form?referrer=114">
       <img src="img/buttons/fsf_member.png"
        alt="[ FSF Associate Member ]" />
     </a>
   </p>
 
-<p class="cke-footer">Leebert: You don't listen to music.
-Leebert: You listen to the audio equivalent of /dev/urandom
+<p class="cke-footer">&lt;ascii_phil&gt; There once was a man named Bertold
+&lt;ascii_phil&gt; Who drank beer when the weather grew cold
+&lt;ascii_phil&gt; As he reached for his cup...
+&lt;ascii_phil&gt; "NEEEEVER GONNA GIVE YOU UP!!!"
+&lt;ascii_phil&gt; Oh, snap! You just got limerickrolled!
 </p>
 <p class="cke-timestamp">Last Modified:
-    September 26, 2008</p>
+    January 21, 2013</p>
   </body>
 </html>
\ No newline at end of file